Repository navigation
曲线数据搬移改用 Array.Copy - #235
Merged
Merged
Conversation
按 chenxuuu#157 里提到的写法,每来一个点要把整条曲线往前挪一格, 逐点赋值换成 Array.Copy 快得多;顺便挡掉 line < 0 的越界。 Refs chenxuuu#157
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #157
按你在 #157 里说的「
Array.Copy确实快」,把PlotPage.AddPoint里每来一个点就逐点搬移整条曲线的循环换掉:顺便挡掉
line < 0的越界(原来只判了>= 10)。#157 里另外两条建议我没动:
AddSignal/轴范围那条你已经说过AxisAuto会强制缩放、不合适,十字光标掉帧也属于交互设计取舍,都不在这个 PR 里。说明:本机是 Linux,WPF 项目编不了,改动只涉这一处数组搬移,逻辑上等价(
Array.Copy自带重叠区域处理)。